package com.ygxsk.carhome.greendao;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;

/**
 * Autuhor:Administrator
 * Time:2023-04-06  11:38
 * Description: this is 卡券发放的类型信息
 */
@Entity(nameInDb = "CARDTYPEINFO")//防止混淆变动
public class CardTypeInfoBean implements Parcelable {

    @Id(autoincrement = true)//主键自动增长
    @Property(nameInDb = "NUMID")
    Long numId;

    @Property(nameInDb = "SHOPID")
    private String shopId;

    //服务站经理的名称
    @Property(nameInDb = "CARDNAME")
    private String cardName;

    //运营开卡 获取顶部的服务站信息列表
    @Property(nameInDb = "CARDTYPE")
    private String cardType;

    //是否被选中
    @Transient
    private transient boolean isChecked;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.numId);
        dest.writeString(this.shopId);
        dest.writeString(this.cardName);
        dest.writeString(this.cardType);
    }

    public void readFromParcel(Parcel source) {
        this.numId = (Long) source.readValue(Long.class.getClassLoader());
        this.shopId = source.readString();
        this.cardName = source.readString();
        this.cardType = source.readString();
    }

    public CardTypeInfoBean() {
    }

    protected CardTypeInfoBean(Parcel in) {
        this.numId = (Long) in.readValue(Long.class.getClassLoader());
        this.shopId = in.readString();
        this.cardName = in.readString();
        this.cardType = in.readString();
    }

    @Generated(hash = 1074267486)
    public CardTypeInfoBean(Long numId, String shopId, String cardName, String cardType) {
        this.numId = numId;
        this.shopId = shopId;
        this.cardName = cardName;
        this.cardType = cardType;
    }

    public static final Parcelable.Creator<CardTypeInfoBean> CREATOR = new Parcelable.Creator<CardTypeInfoBean>() {
        @Override
        public CardTypeInfoBean createFromParcel(Parcel source) {
            return new CardTypeInfoBean(source);
        }

        @Override
        public CardTypeInfoBean[] newArray(int size) {
            return new CardTypeInfoBean[size];
        }
    };


    public Long getNumId() {
        return numId;
    }

    public void setNumId(Long numId) {
        this.numId = numId;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }
}
